<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
    //默认返回一个失败的promise实例,值是reject接受的实参,快速把一个值包装成promise实例
        const p1 = Promise.reject('1')
        console.log('p1',p1);

        //这里返回失败的promise实例,   返回值是一个promise实例,  promise实例里面是失败的promise状态,
        const p2 = Promise.reject(new Promise((resolve,reject)=>{
            resolve('成功')
        }))
        console.log('p2',p2);
    </script>
</body>
</html>